package com.jeesite.modules.dataScreen.web;

import com.jeesite.modules.dataScreen.service.RoadCenterService;
import com.jeesite.modules.dataScreen.web.vo.Result;
import com.jeesite.modules.dataScreen.web.vo.roadcenter.RoadCenter15MinVO;
import com.jeesite.modules.dataScreen.web.vo.roadcenter.RoadCenter30MinVO;
import com.jeesite.modules.dataScreen.web.vo.roadcenter.RoadCenter5MinVO;
import com.jeesite.modules.dataScreen.web.vo.roadcenter.RoadCenter60MinVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author machenzhi
 * @date 2024/09/10 09:39
 */
@RestController
@RequestMapping("/roadCenter")
@Api(tags = "道运中心")
@Slf4j
public class RoadCenterAPI {
    @Autowired
    private RoadCenterService roadCenterService;


    @ApiOperation("道运中心更新频率5分钟数据")
    @GetMapping("/get5MinData")
    public Result<RoadCenter5MinVO> get5MinData() {
        return Result.OK(roadCenterService.get5MinData());
    }



    @ApiOperation("道运中心更新频率15分钟数据")
    @GetMapping("/get15MinData")
    public Result<RoadCenter15MinVO> get15MinData() {
        return Result.OK(roadCenterService.get15MinData());
    }


    @ApiOperation("道运中心更新频率30分钟数据")
    @GetMapping("/get30MinData")
    public Result<RoadCenter30MinVO> get30MinData() {
        return Result.OK(roadCenterService.get30MinData());
    }


    @ApiOperation("道运中心更新频率60分钟数据")
    @GetMapping("/get60MinData")
    public Result<RoadCenter60MinVO> get60MinData() {
        return Result.OK(roadCenterService.get60MinData());
    }


}
